using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using PlugNT.Safe;
using PlugNT.Custom;
using PlugNT.Cms.Model;
//5^1^a^s^p^x
namespace PlugNT.Cms.BLL
{
    public class Templet
    {

        private static readonly PlugNT.Cms.DAL.Templet dal = new PlugNT.Cms.DAL.Templet();








        public TempletInfo GetTempletInfo(int id)
        {
             return dal.GetTempletInfo(id);
        }






        public TempletInfo GetTempletInfo(string clsno)
        {
             return dal.GetTempletInfo(StringHelper.SqlFilter(clsno));
        }








        public bool UpdateByClsno(TempletInfo model)
        {
            return dal.UpdateByClsno(model);
        }






        public bool UpdateById(TempletInfo model)
        {
            return dal.UpdateById(model);
        }






        public bool Delete(string clsno)
        {
            return dal.Delete(StringHelper.SqlFilter(clsno));
        }









        public bool ReplaceTemplet(int id, string indexfile, string listfile, string showfile)
        {
            return dal.ReplaceTemplet(id,indexfile,listfile,showfile);
        }






        public DataTable GetBingList(string  tablePostfix)
        {
            return dal.GetBingList(StringHelper.SqlFilter(tablePostfix));
        }






        public DataTable GetCreateList(string tablePostfix)
        {
            return dal.GetCreateList(StringHelper.SqlFilter(tablePostfix));
        }





        public DataTable GetList()
        {
            return dal.GetList("");
        }






        public DataTable GetListByPostfix(string tablePostfix)
        {
            return dal.GetList(StringHelper.SqlFilter(tablePostfix), "");
        }







        public DataTable GetListByClsno(string clsno)
        {
            return dal.GetList("and clsno='" + PlugNT.Safe.StringHelper.SqlFilter(clsno) + "'");
        }








        public DataTable GetSiteList()
        {
            return dal.GetList("and ismap=1 ");
        }






        public string Help()
        {
            return @"mailto:354990393@qq.com";
        }


    }
}
